import { createRouter, createWebHistory } from 'vue-router'
import HomePage from '@/pages/HomePage.vue'
import UserLoginPage from '@/pages/user/UserLoginPage.vue'
import UserRegisterPage from '@/pages/user/UserRegisterPage.vue'
import UserManagePage from '@/pages/admin/UserManagePage.vue'
import addPicturePage from '@/pages/addPicturePage.vue'
import PictureManagePage from '@/pages/admin/PictureManagePage.vue'
import PictureDetailPage from '@/pages/PictureDetailPage.vue'
import addPictureBatchPage from '@/pages/addPictureBatchPage.vue'
import SpaceManagePage from '@/pages/admin/SpaceManagePage.vue'
import addSpacePage from '@/pages/addSpacePage.vue'
import MySpacePage from '@/pages/MySpacePage.vue'
import SpaceDetailPage from '@/pages/SpaceDetailPage.vue'
import SearchPicturePage from '@/pages/SearchPicturePage.vue'
import addPictureTextToImage from '@/pages/addPictureTextToImage.vue'
import SpaceAnalyzePage from '@/pages/SpaceAnalyzePage.vue'
import SpaceUserManagePage from '@/pages/admin/SpaceUserManagePage.vue'
import AIPage from '@/pages/AIPage.vue'
import AIChat from '@/components/AIChat.vue'
import GameChat from '@/components/GameChat.vue'
import CustomerService from '@/components/CustomerService.vue'
import ChatPDF from '@/components/ChatPDF.vue'




const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/',
      name: 'home',
      component: HomePage,
    },
    {
      path: '/user/login',
      name: '用户登录',
      component: UserLoginPage,
    },
    {
      path: '/user/register',
      name: '用户注册',
      component: UserRegisterPage,
    },
    {
      path: '/admin/userManage',
      name: '用户管理',
      component: UserManagePage,
    },
    {
      path: '/admin/spaceManage',
      name: '空间管理',
      component: SpaceManagePage,
    },
    {
      path: '/my_space',
      name: '我的空间',
      component: MySpacePage,
    },
    {
      path: '/add_picture',
      name: '创建图片',
      component: addPicturePage,
    },
    {
      path: '/add_space',
      name: '创建空间',
      component: addSpacePage,
    },
    {
      path: '/add_picture/batch',
      name: '批量创建图片',
      component: addPictureBatchPage,
    },
    {
      path: '/add_picture/text_to_image',
      name: 'AI文字生成图片',
      component: addPictureTextToImage,
    },
    {
      path: '/spaceUserManage/:id',
      name: '空间成员管理',
      component: SpaceUserManagePage,
      props: true,
    },
    {
      path: '/user_AI',
      name: 'ai大模型',
      component: AIPage,
    },
    {
      path: '/user_AISpring',
      name: 'ai大模型Spring',
      component: AIChat,
    },
    {
      path: '/user_AIGAME',
      name: 'ai大模型实现哄哄模拟器',
      component: GameChat,
    },
    {
      path: '/user_AIService',
      name: 'ai大模型实现智能客服',
      component: CustomerService,
    },
    {
      path: '/user_AIPDF',
      name: 'ai大模型实现知识库PDF',
      component: ChatPDF,
    },
    {
      path: '/space_analyze',
      name: '空间分析',
      component: SpaceAnalyzePage,
    },
    {
      path: '/search_picture',
      name: '以图搜图',
      component: SearchPicturePage,
    },
    {
      path: '/admin/pictureManage',
      name: '图片管理',
      component: PictureManagePage,
    },
    {
      path: '/picture/:id',
      name: '图片详情',
      component: PictureDetailPage,
      props: true,
    },
    {
      path: '/space/:id',
      name: '空间详情',
      component: SpaceDetailPage,
      props: true,
    },
  ],
})

export default router
